package com.qipay.cp;


import com.qipay.baas.model.Cp;
import com.qipay.baas.model.CpAccount;
import com.qipay.baas.model.CpZhiding;
import com.qipay.core.entity.Pagination;

import java.util.List;

public interface CpService {

    List<Cp> findAll(int p, int pz);

    List<Cp> findAll();
    List<CpAccount> allCpList(String name,Long cpId,String contact,String phone,Byte state,Long agentId,Pagination pagination);//cp列表的数据

    List<CpAccount> allAgentList(String name,Long cpId,String person,String phone,Byte state,Long agentId,Pagination pagination);//cp列表的数据
    CpAccount allCpListTj();

    List<CpZhiding> findAllZd(int agentId);

    Long count();

    List<Cp> findByType(byte type, int p, int pz);

    Long countByType(byte type);

    List<Cp> findByAgentId(long agentId, int p, int pz);

    Long countByAgentId(long agentId);

    Cp getOneByAppId(String appId);

    Cp getOneById(long id);

    int update(Cp cp);

    int insert(Cp cp);

    int delete(long id);

    int updateAccountState(long cpId, byte state);

    int updateContractState(long cpId, byte state);

    boolean isIPValid(long cpId, String ip);

    boolean isIPValid(long cpId, String ip,boolean force);

    List<Cp> findByAgentIdAndAccountState(Long agentId, Byte accountState);

    int updatePwd(long cpId, String pwd);
}
